<table cellpadding="0" cellspacing="0" summary="post_attachbody" border="0" width="100%">
<!--{loop $attachlist $attach}-->
	<tbody id="attach_$attach[aid]">
		<tr>
			<td class="attachname_swf">
				<p id="attach$attach[aid]">
					<span>$attach[filetype] <a href="javascript:;" class="lighttxt" onclick="{if $attach['isimage']}insertAttachimgTag('$attach[aid]'){else}insertAttachTag('$attach[aid]'){/if}" title="{lang upload_msg}">$attach[filename]</a></span>
					<!--{if $allowattachurl}-->
						<a href="javascript:;" class="attachurl" title="{lang e_attach_url}" onclick="insertText('attach://$attach[aid].{echo fileext($attach[filenametitle])}')"><img src="{IMGDIR}/attachurl.gif" /></a>
						<!--{if ($attachmcode = parseattachmedia($attach))}--><a href="javascript:;" class="attachurl" title="{lang e_attach_mediacode}" onclick="insertText('$attachmcode')"><img src="{IMGDIR}/attachmediacode.gif" /></a><!--{/if}-->
					<!--{/if}-->
					{if $attach['pid']}&nbsp;<a href="javascript:;" onclick="updateAttach('$attach[aid]')">{lang update}</a></span>{/if}
				</p>
				<span id="attachupdate$attach[aid]"></span>
				<!--{if $attach['isimage']}--><img src="$attach[url]/$attach[attachment]" id="image_$attach[aid]" width="$attach[width]" _width="$attach[width]" _height="110" onload="thumbImg(this, 1)" style="position:absolute;top:-10000px" /><!--{/if}-->
			</td>
			<td class="attachdesc"><input name="attachnew[{$attach[aid]}][description]" value="$attach[description]" size="18" class="txt" /></td>
			<!--{if $allowsetattachperm}--><td class="attachview"><input type="text" name="attachnew[{$attach[aid]}][readperm]" value="$attach[readperm]" size="1" class="txt" /></td><!--{/if}-->
			<!--{if $maxprice}--><td class="attachpr"><input type="text" name="attachnew[{$attach[aid]}][price]" value="$attach[price]" size="1" class="txt" /></td><!--{/if}-->
			<td class="attachdel"><a href="javascript:;" class="deloption" onclick="delAttach($attach[aid],{if !$attach[pid]}1{else}0{/if})">{lang e_attach_del}</a></td>
		</tr>
	</tbody>
<!--{/loop}-->
</table>
<!--{if !empty($inajax)}-->
	<script type="text/javascript" reload="1">
	ATTACHNUM['attachunused'] += {echo count($attachlist)};
	updateattachnum('attach');
	</script>
<!--{/if}-->